package com.zqxq.lottery.util;

import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Component;

/**
 * @author 苦智
 * @date 2018/4/16 18:16
 * @description 排列3中奖计算
 * @ClassName CalculatorPL
 */
@Component
public class CalculatorPL extends Calculator{

    private static Object[] winningsList = {1040,346,346,173};

    @Override
    public String winInfo(int[] win, Integer betTimes) {
        return winInfo(win,winningsList,betTimes);
    }

    /**
     * @Author 苦智
     * @Description
     * @Date 17:44 2018/4/16
     * @Param [lotteryNum, bettingNum, lotteryId, playType] 开奖号码、投注号码、奖种、玩法
     * @return int[]
     **/
    @Override
    public int[] win(String lotteryNum, String bettingNum, String playType){
        return commonCalculation(lotteryNum,bettingNum,playType);
    }

    public static void main(String[] args) {
        int[] win = new CalculatorPL().win("2,2,1","2|1","2");
        System.out.println(JSONObject.toJSONString(win));
        System.out.println(new CalculatorPL().winInfo(win,1));
    }
}
